<!DOCTYPE html>
<html>
  <head>
    <title>最新电影</title>
  
    <link rel="stylesheet" href="../css/main.css">

     <link rel='stylesheet' href='/stylesheets/style.css' />
    <script type="text/javascript" src="/javascripts/xheditor/jquery/jquery-1.11.2.min.js"></script>
    <script type="text/javascript" src="/javascripts/xheditor/xheditor-1.2.2.min.js"></script>
    <script type="text/javascript" src="/javascripts/xheditor/xheditor_lang/zh-cn.js"></script>
    <style>
        li{list-style: none;}
        body{color: black;}
        a{text-decoration: none; color: blue;}
        .detail_box{width: 94%;height: 600px;border: 1px solid red;margin: 0 auto;}
        .detail_box h2{margin-left: 50px;}
        .detail_box li{float:left;}
        .detail_box .detail{margin-left: 50px;}
    </style>
  </head>
  <body>
   <%- include header %>


<% mesg.forEach(function(item,index){%>
    <div class="detail_box">
      <h2><%= item.genres%></h2>
      <ul>
        <li class="img">
          <img src="<%= item.images.large%>" alt="">
        </li>
        <li class="detail">
          <h2 style="margin-left:0px;"><a href="##"><%= item.year %><%= item.title %></a></h2>
          <p>电影详情:由 <%= item.casts[0].name%>、 <%= item.casts[1].name%>、 <%= item.casts[2].name%> 主演，讲述的是。。。。。</p>
        </li>
      </ul>
    </div>
<% }) %>


      <div style="width:94%;min-height:200px;margin:0 auto;">
          <h3>评论区：</h3>
        <table class="login" border="1">
    <tr>
        <td>id</td>
        <td>title</td>
        <td>content</td>
    </tr>

    <% list.forEach(function(item,index){%>
      
      <tr>
       <td><%= (index+1) %></td>

       <td><%- item.title %></td>
       <td><%- item.content %></td>
       </tr>
       <%})%>
<% mesg.forEach(function(item,index){%>
    <tr>
        <td colspan="3">
            <a href="./detail?id=<%= item.id %>&pageNo=1">首页</a>
            <a href="./detail?id=<%= item.id %>&pageNo=<%= pageNo > 1 ?  parseInt(pageNo)-1: 1 %>">上一页</a>
            <a href="./detail?id=<%= item.id %>&pageNo=<%= pageNo< totalPages ? parseInt(pageNo)+1: totalPages%>">下一页</a>
            <a href="./detail?id=<%= item.id %>&pageNo=<%= totalPages%>">末页</a>
            <%= pageNo %> / <%= totalPages%> 共<%= count %>条记录
        </td>
    </tr>
    <%})%>
    </table>


      </div>
   
  

    <%- include comment %>



    
    <style>
      form{width: 94%;margin: 0 auto;height:300px;background: mediumaquamarine;}
    </style>


    <%- include footer%>
    
    


  </body>
</html>


